package com.google.code.lightsomy.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotates that a class is a filter and should be 
 * invoked after controllers action.
 * 
 * @author Viktoras Agejevas
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface RequestExitFilter {
	
	/**
	 * Setter method for HttpServletRequest param.
	 * 
	 * @return name of setter method
	 */
	String requestSetter() default "setRequest";
	
	/**
	 * Setter method for HttpServletResponse param.
	 * 
	 * @return name of setter method
	 */
	String responseSetter() default "setResponse";
	
	/**
	 * Invoker method name. This method is invoked then the object is created.
	 * 
	 * @return invoker method name
	 */
	String filterMethod() default "filter";
}
